import http from "./http";
const BASE_URL_PATH = "/cms/content";

export default {
  get(id) {
    return http.get(`${BASE_URL_PATH}/${id}`);
  },
  list(params) {
    return http.post(`${BASE_URL_PATH}/list`, { data: JSON.stringify(params) });
  },
  create(data) {
    return http.post(`${BASE_URL_PATH}`, { data: JSON.stringify(data) });
  },
  update(data) {
    return http.put(`${BASE_URL_PATH}`, { data: JSON.stringify(data) });
  },
  delete(id) {
    return http.delete(`${BASE_URL_PATH}/${id}`);
  },
};
